import request from '@/utils/request'
//消息接口
export function sysNoticeQuery(data) { //私信信息分页列表
    return request({
        method: 'get',
        url: '/sysNotice/query',
        params: data
    })
}

export function sysQueryNoticeByOneSelf(data) { //私信专门接口
    return request({
        method: 'get',
        url: '/sysNotice/queryNoticeByOneSelf',
        params: data
    })
}

export function sysNoticeQueryById(id) { //查询一条私信信息
    return request({
        method: 'get',
        url: '/sysNotice/query/' + id,
    })
}

export function sysNoticeAdd(data) { //添加一条私信信息
    return request({
        method: 'post',
        url: '/sysNotice/add',
        data
    })
}

export function sysNoticeDelete(data) { //删除一条私信信息
    return request({
        method: 'post',
        url: '/sysNotice/delete',
        data
    })
}

export function sysNoticeDeleteById(id) { //删除一条私信信息
    return request({
        method: 'get',
        url: '/sysNotice/deleteById/' + id
    })
}

export function sysNoticeDeleteByOneSelf(data) { //删除私信
    return request({
        method: 'post',
        url: '/sysNotice/deleteByOneSelf',
        params: data
    })
}

export function sysNoticeUpdate(data) { //修改一条私信信息
    return request({
        method: 'post',
        url: '/sysNotice/update',
        data
    })
}
export function sysReadNotice(id) { //阅读私信
    return request({
        method: 'get',
        url: '/sysNotice/readNotice/' + id
    })
}

//通知公告附件管理接口
export function sysNoticeFilesQuery(data) { //删除一条通知公告附件管理接口
    return request({
        method: 'get',
        url: '/sysNoticeFiles/query',
        params: data
    })
}

export function sysNoticeFilesAdd(data) { //添加一条通知公告附件管理接口
    return request({
        method: 'post',
        url: '/sysNoticeFiles/add',
        data
    })
}

export function sysNoticeFilesDelete(id) { //删除一条通知公告附件管理接口
    return request({
        method: 'get',
        url: '/sysNoticeFiles/delete/' + id,
    })
}